package com.timss.opmm.bean;

import java.io.Serializable;

/**
 * 
* @ClassName: RulesDetail 
* @Description: 规则详细表
* @author: fengzt 
* @date: 2014年5月28日
*
 */
public class RulesDetail implements Serializable {

    private static final long serialVersionUID = 1335277726628324011L;
    
    /**
     * key
     */
    private int id;
    
    /**
     * 天次
     */
    private int dayTime;
    
    /**
     * 值别表
     */
    private Duty duty;
    
    /**
     * 班次表
     */
    private Classes classes;
    
    /**
     * 排班规则
     */
    private Rules rules;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getDayTime() {
        return dayTime;
    }

    public void setDayTime(int dayTime) {
        this.dayTime = dayTime;
    }

    public Duty getDuty() {
        return duty;
    }

    public void setDuty(Duty duty) {
        this.duty = duty;
    }

    public Classes getClasses() {
        return classes;
    }

    public void setClasses(Classes classes) {
        this.classes = classes;
    }

    public Rules getRules() {
        return rules;
    }

    public void setRules(Rules rules) {
        this.rules = rules;
    }

    @Override
    public String toString() {
        return "RulesDetail [id=" + id + ", dayTime=" + dayTime + ", duty="
                + duty + ", classes=" + classes + ", rules=" + rules + "]";
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((classes == null) ? 0 : classes.hashCode());
        result = prime * result + dayTime;
        result = prime * result + ((duty == null) ? 0 : duty.hashCode());
        result = prime * result + id;
        result = prime * result + ((rules == null) ? 0 : rules.hashCode());
        return result;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        RulesDetail other = (RulesDetail) obj;
        if (classes == null) {
            if (other.classes != null)
                return false;
        } else if (!classes.equals(other.classes))
            return false;
        if (dayTime != other.dayTime)
            return false;
        if (duty == null) {
            if (other.duty != null)
                return false;
        } else if (!duty.equals(other.duty))
            return false;
        if (id != other.id)
            return false;
        if (rules == null) {
            if (other.rules != null)
                return false;
        } else if (!rules.equals(other.rules))
            return false;
        return true;
    }
    
    
}
